ec875ef26c7f57189d870e706adb04d64739ccfc,wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/DocType.java,DocType,toOutputStream,#OutputStream#boolean#,225

Before Change


    public void toOutputStream(final OutputStream os, final boolean rebuild)
            throws IOException {
        if (prependDocType) {
            os.write((docTypeTag + "\n").getBytes(getCharset()));
        }
        super.toOutputStream(os, rebuild);
    }

    /**

After Change


    @Override
    public int toOutputStream(final OutputStream os, final boolean rebuild)
            throws IOException {
        int docTypeTagLength = 0;
        if (prependDocType) {
            final byte[] docTypeTagBytes = (docTypeTag + "\n")
                    .getBytes(getCharset());
            os.write(docTypeTagBytes);
            docTypeTagLength = docTypeTagBytes.length;
        }
        return docTypeTagLength + super.toOutputStream(os, rebuild);
    }

    /**